#include <iostream>
#include <string>

template<typename T>
int compare(const T& left, const T& right) {
    if (left < right) {
        std::cout << left << " < " << right << std::endl;
        return -1; 
    }
    if (right < left) {
        std::cout << left << " > " << right << std::endl;
        return 1; 
    }
    std::cout << "数据类型不匹配" << std::endl;
    return 0;
}

template<typename T>
void print(const T& t)
{
    std::cout << "输入为：" << t << std::endl;
}


int main()
{
    int return_vale;
    return_vale = compare<float>(0.1, -0.2);
    std::cout << "return_vale : " << return_vale << std::endl;
    print<std::string>("aa");
}